<?php get_header(); ?>
<div class="bodywraper">
    <div class="bodyleftadd">
        <?php dynamic_sidebar('Left Sidebar'); ?>
    </div>
    <div class="bodynews">
        <section id="primary" class="site-content">
            <div id="content" role="main">
                <?php
                    $id = $_GET['cat'];
                    query_posts('cat='.$id.'&posts_per_page=6');
                ?>
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                        <div class="newstotle">
                            <h2>
                                <a href="<?php the_permalink() ?>" rel = "bookmark" title = "Permanent Link to <?php the_title_attribute(); ?>">
                                    <?php the_title(); ?>
                                </a>
                            </h2>
                            <p class="entry">
                                <?php echo excerpt('20'); ?>
                            </p>
                            <p class="date"><small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small></p>
                        </div>

                    <?php endwhile;
                else: endif;
                ?>
            </div>
        </section>
    </div>
    <div class="bodyrightadd">
        <?php
        $id = $_GET['cat'];
        query_posts('cat=' . $id . '&posts_per_page=12');
        $yourcat = get_category($id);
        ?>
        <div class="right_widget">
            <h3><?php echo $yourcat->name; ?>'র অন্যান্য সংবাদ</h3>
            <ul class="recentposts">
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                <li class="cat-item cat-item-5">
                    <a title="Permanent Link to <?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"><?php echo the_title(); ?></a>
                </li>
                <?php    
                endwhile;
                else:
                endif;
                ?>
            </ul>
        </div>
        
        <?php dynamic_sidebar('Right Sidebar'); ?>
    </div>
</div>
<?php get_footer(); ?>